<%@ page import="model.*" %>
<%User[] userlist = (User[]) request.getAttribute("userlist[]"); %>
<%String[] groupname = (String[]) request.getAttribute("groupname[]"); %>
<%@ include file="header.tpl.jsp" %>

<div class="box list">
	<h2>User List</h2>
	<table>
		<thead>
			<tr><td>UID</td><td>User Name</td><td>E-mail</td><td>User Group</td><td>Operation</td></tr>
		</thead>
		<tbody>
		<%for(int i = 0; i < userlist.length; i++){%>
			<% User u = userlist[i];%>
			<tr>
				<td><%=u.getUid()%></td>
				<td><%=u.getUsername()%></td>
				<td><%=u.getEmail()%></td>
				<td><%=groupname[i]%></td>
				<td><a href="EditUser?uid=<%=u.getUid()%>">[Edit]</a></td>
			</tr>
		<%}%>
		</tbody>
	</table>
</div>

<%@ include file="footer.tpl.jsp" %>